﻿<%@ Page Title="Register" Language="C#" MasterPageFile="~/GuestView.master" AutoEventWireup="true"
    CodeBehind="PageRegister.aspx.cs" Inherits="BestBuy.PageGuest.PageRegister" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server" />
    <div class="container">
    <table width="100%" align="center">
        <tr>
            <td colspan="3" class="td_center">
                <h1 class="td_left">
                    <asp:Label ID="Label1" CssClass="td_center" runat="server" Text="Register"></asp:Label>
                </h1>
                <hr />
            </td>
        </tr>
        <tr>
            <td>
            </td>
            <td>
                <asp:Panel ID="pnThongBao" runat="server">
                    <asp:Label ID="lbThongBao" runat="server"></asp:Label>
                </asp:Panel>
            </td>
            <td>
            </td>
        </tr>
        <tr>
            <td class="td_right_register">
                <span style="color:red">*</span> Country/Region :
            </td>
            <td class="td_left_register">
                <asp:DropDownList ID="ddlCountry" runat="server" Height="27px" AppendDataBoundItems="True">
                    <asp:ListItem Value="0" Text="--Select Country--" />
                </asp:DropDownList>
                <ajaxToolkit:ListSearchExtender ID="lseCountry" PromptCssClass="ListSearchExtender"
                    runat="server" QueryTimeout="0" PromptPosition="Top" TargetControlID="ddlCountry">
                </ajaxToolkit:ListSearchExtender>
            </td>
            <td>
                <asp:CompareValidator ID="cvCountry" runat="server" ControlToValidate="ddlCountry"
                    ValueToCompare="0" Operator="NotEqual" ErrorMessage="" CssClass="failureNotification">Please select your country.</asp:CompareValidator>
            </td>
        </tr>
        <tr>
            <td class="td_right_register">
                 <span style="color:red">*</span> Product : 
            </td>
            <td class="td_left_register">
                <asp:TextBox ID="txtProduct" runat="server" Width="205px"></asp:TextBox>
            </td>
            <td>
                <asp:RequiredFieldValidator ID="rfvProduct" runat="server" ErrorMessage="RequiredFieldValidator"
                    ControlToValidate="txtProduct" ForeColor="Red">Please enter your product.</asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td class="td_right_register">
                 <span style="color:red">*</span> I am :
            </td>
            <td class="td_left_register">
                <asp:RadioButtonList ID="rbtType" runat="server" CssClass="radiobutton"
                    RepeatDirection="Horizontal" Width="150px">
                    <asp:ListItem Value="1">Buyer</asp:ListItem>
                    <asp:ListItem Value="2">Suplier</asp:ListItem>
                </asp:RadioButtonList>
            </td>
            <td>
                <asp:RequiredFieldValidator ID="rfvIam" CssClass="failureNotification" runat="Server" ControlToValidate="rbtType" ForeColor="Red">Select the type of user name</asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td class="td_right_register">
                 <span style="color:red">*</span> Email :
            </td>
            <td class="td_left_register">
                <asp:TextBox ID="txtEmail" runat="server" Width="205px"></asp:TextBox>
            </td>
            <td>
                <asp:RequiredFieldValidator ID="rfvEmail" runat="server" ErrorMessage="RequiredFieldValidator"
                    ControlToValidate="txtEmail" ForeColor="Red">Please provide a valid Email Address</asp:RequiredFieldValidator>
                <br />
                <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="txtEmail"
                    ErrorMessage="Your email address uncorrect" ForeColor="Red" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator>
                <br />
                <asp:CustomValidator ID="cusvEmail" runat="server" ControlToValidate="txtEmail" ErrorMessage="Email exists"
                    ForeColor="#CC0000" OnServerValidate="cusvEmail_ServerValidate"></asp:CustomValidator>
            </td>
        </tr>
        <tr>
            <td class="td_right_register">
                 <span style="color:red">*</span> Password :
            </td>
            <td class="td_left_register">
                <asp:TextBox ID="txtPass" runat="server" TextMode="Password" Width="205px"></asp:TextBox>
            </td>
            <td>
                <asp:RequiredFieldValidator ID="rfvPass" runat="server" ErrorMessage="RequiredFieldValidator"
                    ControlToValidate="txtPass" ForeColor="Red">Please enter your password</asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td class="td_right_register">
                <span style="color:red">*</span> Name :
            </td>
            <td class="td_left_register">
                <asp:TextBox ID="txtFirstname" runat="server"></asp:TextBox>
                &nbsp;
                <asp:TextBox ID="txtLastname" runat="server"></asp:TextBox>
            </td>
            <td>
                <asp:RequiredFieldValidator ID="rfvFName" runat="server" ErrorMessage="RequiredFieldValidator"
                    ControlToValidate="txtFirstName" ForeColor="Red">First name is required</asp:RequiredFieldValidator>
                <br />
                <asp:RequiredFieldValidator ID="rfvLName" runat="server" ErrorMessage="RequiredFieldValidator"
                    ControlToValidate="txtLastName" ForeColor="Red">Last name is required</asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td class="td_right_register">
                Gender : </td>
            <td class="td_left_register">
                <asp:RadioButtonList ID="rblGender" runat="server" RepeatDirection="Horizontal" 
                    Width="150px" CssClass="radiobutton">
                    <asp:ListItem Value="false">Male</asp:ListItem>
                    <asp:ListItem Value="true">Female</asp:ListItem>
                </asp:RadioButtonList>
            </td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td class="td_right_register">
                 <span style="color:red">*</span> Company name :
            </td>
            <td class="td_left_register">
                <asp:TextBox ID="txtCompany" runat="server" Width="205px"></asp:TextBox>
            </td>
            <td>
                <asp:RequiredFieldValidator ID="rfvCompany" runat="server" ErrorMessage="RequiredFieldValidator"
                    ControlToValidate="txtCompany" ForeColor="Red">Please enter your Company Name</asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td class="td_right_register">
                 <span style="color:red">*</span> Phone :
            </td>
            <td class="td_left_register">
                <asp:TextBox ID="txtPhone" MaxLength="11" runat="server" Width="205px"></asp:TextBox>
            </td>
            <td>
                <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ControlToValidate="txtPhone"
                    ErrorMessage="Just enter number" ForeColor="Red" ValidationExpression="(^([0-9]*|\d*\d{1}?\d*)$)"></asp:RegularExpressionValidator>
                <br />
                <asp:RequiredFieldValidator ID="rfvPhone" runat="server" ErrorMessage="RequiredFieldValidator"
                    ControlToValidate="txtPhone" ForeColor="Red">Please enter your Phone Number</asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td class="td_right_register">
                 <span style="color:red">*</span> Industry :
            </td>
            <td class="td_left_register">
                <asp:DropDownList ID="ddlIndustry" runat="server" AppendDataBoundItems="True">
                    <asp:ListItem Value="0" Text="--Select Industry--" />
                </asp:DropDownList>
                <ajaxToolkit:ListSearchExtender ID="lseIndustry" PromptCssClass="ListSearchExtender"
                    runat="server" QueryTimeout="0" PromptPosition="Top" TargetControlID="ddlIndustry">
                </ajaxToolkit:ListSearchExtender>
            </td>
            <td>
                <asp:CompareValidator ID="cvIndustry" runat="server" ControlToValidate="ddlIndustry"
                    ValueToCompare="0" Operator="NotEqual" ErrorMessage="" CssClass="failureNotification">Please select your industry.</asp:CompareValidator>
            </td>
        </tr>
        <tr>
            <td class="td_right_register">
                Yahoo :
            </td>
            <td class="td_left_register">
                <asp:TextBox ID="txtYahoo" runat="server" Width="205px"></asp:TextBox>
            </td>
            <td>
                &nbsp;
            </td>
        </tr>
        <tr>
            <td class="td_right_register">
                Skype :
            </td>
            <td class="td_left_register">
                <asp:TextBox ID="txtSkype" runat="server" Width="205px"></asp:TextBox>
            </td>
            <td>
                &nbsp;
            </td>
        </tr>
        <tr>
            <td class="td_right_register">
                &nbsp;
            </td>
            <td class="td_left_register">
                <asp:Button ID="btnJoin" CssClass="style_button" CausesValidation="true" runat="server"
                    Height="29px" Text="Join" Width="97px" OnClick="btnJoin_Click" />
                <asp:Button ID="btnRe" CssClass="style_button" CausesValidation="false" runat="server"
                    Height="29px" Text="Refresh" Width="97px" OnClick="btnRe_Click" />
            </td>
        </tr>
    </table>
    <div style="padding-bottom:50px"></div>
    </div>
</asp:Content>
